package com.yuyou.train.user.mapper;

import java.util.List;

import com.yuyou.train.user.vo.req.ReqUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yuyou.train.service.api.lesson.entity.LessonClassUserRelation;
import com.yuyou.train.service.api.user.dto.UserPageDTO;
import com.yuyou.train.service.api.user.entity.User;
import com.yuyou.train.util.bean.Pagination;

@Mapper
public interface UserMapper {

    int insert(User record);

    User selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(User record);

    
    List<UserPageDTO> findUserPageList(Pagination<UserPageDTO> p);
    
    int findUserPageCount(Pagination<UserPageDTO> p);
    
    List<User> findUsers(ReqUser reqUser);
    
    User selectUsersByPhone(String phone);

    User selectUserByPhone(String phone);
    
    int batchUpdSta(@Param(value="ids") List<String> ids,@Param(value="status")String status);

    int batchInsertUser(List<User> userList);
    
    int endLessonClass(
    		LessonClassUserRelation lessonClassUserRelation);

    int batchInsertLessonClassUserRelation(List<LessonClassUserRelation> lessonClassUserRelationList);
    
    String selectChooseTeacher(
    		@Param(value="subjectId") String subjectId,
    		@Param(value="classId") String classId);

    Integer countUsers(ReqUser reqUser);

    Integer countHomework(String userId);

    Integer countCheckOfMyStudent(String userId);

    Integer countCheckOfClassStudent(String userId);

    Integer countEndWord(String userId);

    int findTeacherPageCount(Pagination<UserPageDTO> p);

    List<UserPageDTO> findTeacherPageList(Pagination<UserPageDTO> p);

}